<template>
  <div>
    <div>{{firstt}}</div>
    <div>{{rightText}}</div>
    <button @click="handleClick">改变右一按钮</button>
    <!-- <div>对应{{first}}的内容</div>  -->
    <chart-demo></chart-demo>
  </div>
</template>

<script>
import ChartDemo from './chart_demo'
import { mapActions } from 'vuex'

export default {
  components: {
    'chart-demo': ChartDemo
  },
  data () {
    return {
      rightText: ''
    }
  },
  computed: {
    first () {
      return this.$route.params.label
    },
    firstt () {
      return this.$route.query.label
    }
  },
  methods: {
    ...mapActions('content', {
      setText: 'setText'
    }),
    handleClick () {
      this.setText('右边第一部分')
    }
  }
}
</script>
